
#pragma once
#include "include/hpdf.h"
#include<string>
#include<vector>


class CPDF
{
public:
	enum Dash{continu,tiretX_,tiretX_x_,tiretX_x_O_};
public:
	CPDF(void);
	~CPDF(void);

	void SetOffsets(HPDF_REAL xOFF,HPDF_REAL yOFF);
	void SetDocumentSize(unsigned width,unsigned height);
	unsigned GetDocumentHeight() const;
	unsigned GetDocumentWidth() const;
	
	void SetLineWidth(HPDF_REAL width);
	void SetDash(Dash d,std::vector<int> dash=std::vector<int>());	
	void SetRGBFill(HPDF_REAL r,HPDF_REAL g,HPDF_REAL b);
	void SetRGBStroke(HPDF_REAL r,HPDF_REAL g,HPDF_REAL b);
	void SetGrayFill(HPDF_REAL grayLevel);
	void SetGrayStroke(HPDF_REAL grayLevel);




	void Line(HPDF_REAL x1,HPDF_REAL y1,HPDF_REAL x2,HPDF_REAL y2);
	void Rectangle(HPDF_REAL x,HPDF_REAL y,HPDF_REAL width,HPDF_REAL height);	
	void RectangleFilled(HPDF_REAL x,HPDF_REAL y,HPDF_REAL width,HPDF_REAL height);	
	void Circle( HPDF_REAL     x,HPDF_REAL     y,HPDF_REAL     ray);
	void CircleFilled( HPDF_REAL     x,HPDF_REAL     y,HPDF_REAL     ray);
	void Text( HPDF_REAL x, HPDF_REAL y,const char * text);
	
	void SaveToFile(std::string filename);
private:
	HPDF_Doc  pdf;
    HPDF_Font font;
    HPDF_Page page;
	HPDF_REAL _XOFFset,_YOFFset;
};

